﻿using DataMain;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using MbUnit.Framework;
using NHibernate.Tool.hbm2ddl;

namespace Tests
{
  [TestFixture]
  public class GenerateSchemaFixture
  {
    [Test]
    public void Can_generate_schema()
    {
      var cfg = Fluently
            .Configure()
            .Database(SQLiteConfiguration.Standard.InMemory)
            .Mappings(m => m.FluentMappings.AddFromAssemblyOf<SessionProvider>())
            .BuildConfiguration();

      new SchemaExport(cfg).Execute(false, true, false, true);
    }
  }
}